<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script src="jQuery.js"></script>
    </head>
    <body>
        <script>
            /**
             * @class A
             */
            function A(a) {
                this.a = a
            }

            A.prototype.f = function() {
                return 'A'+this.a+'A'
            }

            /**
             * @class B
             */
            B.prototype = jQuery.extend(true, {}, A.prototype)
            function B(a, b) {
                A.apply(this, [a])
                this.b = b
            }

            B.prototype.f = function() {
                return A.prototype.f.apply(this)+'B'+this.b+'B'
            }

            var a = new A(1)
            var b = new B(2, 3)
        </script>
    </body>
</html>